package cn.piesat.service.intf;

import cn.piesat.vo.role.*;
import com.alibaba.fastjson.JSONArray;
import cn.piesat.dto.PiesatRoleInfoDTO;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * 角色服务层接口定义
 *
 * @author xhl
 */
public interface RoleService {

    /**
     * 添加角色基本信息
     * @param vo
     * @return
     */
    Map<String, String> add(AddRoleVO vo);

    /**
     * 
     * @param vo
     * @return
     */
    Map<String, String> update(UpdateRoleVO vo);

    PiesatRoleInfoDTO getOne(String id);

    Map<String, Object> list(Pageable pageable, RoleSearchVO searchDTO);

    Map<String, String> addAuthorizeMenu(AuthorizeMenuVO authorizeMenuDTO);

    Map<String, String> deleteOne(String id);

    Map<String, String> addAuthorizeResource(AuthorizeResourceVO authorizeResourceVO);

    JSONArray findMenuListByRoleId(String roleId);

    JSONArray findResourceListByRoleId(String roleId);

    List<RoleUrlProjectionVO> listRoleUrl();

    List<PiesatRoleInfoDTO> findAll();
}
